/*
 * RenewItemsStrutsActionForm.java
 *
 * Created on July 8, 2007, 12:54 AM
 */

package com.abbh.libcommunity.struts.beans;

import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
import java.util.Date;


/**
 *
 * @author Atef A. Ahmed
 * @version
 */

public class RenewItemsStrutsActionForm extends org.apache.struts.action.ActionForm {
    
    private Integer id;
    private Integer itemId;
    private Integer userId;
    private Date rentDate;
    private Date dueDate;
    private Integer renew;
    
    public RenewItemsStrutsActionForm() {
        super();
        // TODO Auto-generated constructor stub
    }
    
    public Integer getId(){
        return id;
    }
    
    public void setId(Integer id){
        this.id=id;
    }
    
    public Integer getItemId(){
        return itemId;
    }
    
    public void setItemId(){
        this.itemId = itemId;
    }
    
    public Integer getUserId(){
        return userId;
    }
    
    public void setUserId(){
        this.userId = userId;
    }
    
    public Date getRentDate(){
        return rentDate;
    }
    
    public void setRentDate(){
        this.rentDate = rentDate;
    }
    
    public Date getDueDate(){
        return dueDate;
    }
    
    public void setDueDate(){
        this.dueDate = dueDate;
    }
    
    public Integer getRenew(){
        return renew;
    }
    
    public void setRenew(){
        this.renew = renew;
    }
    public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
        ActionErrors errors = new ActionErrors();
        if (getId() == null) {
            errors.add("name", new ActionMessage("error.name.required"));
            // TODO: add 'error.name.required' key to your resources
            
        }
        return errors;
    }
}
